/*== VSLT_prc_ErrorSummary ==================================================================
===============================================================================*/
	--START CODE--
	CREATE PROCEDURE VSLT_prc_ErrorSummary
		@RunId INT
		,@NumberOfRows INT = 25
		,@IncludePerfCounterErrors INT = NULL
	AS
		SELECT TOP (@NumberOfRows) 
			COUNT (*) AS [Qty] 
			,MessageType 
			,SubType 
			,TestCaseName 
			,RequestUri
		FROM LoadTestMessageSummary
		WHERE 
			(@IncludePerfCounterErrors IS NULL OR
				(SubType != 'LoadTestException' AND SubType NOT LIKE 'LoadTestCounter%'))
			AND LoadTestRunId = @RunId
		GROUP BY TestCaseName, RequestUri, MessageType, SubType
		ORDER BY [Qty] DESC
	GO
	--START CODE--
	GRANT EXECUTE ON VSLT_prc_ErrorSummary TO PUBLIC
	GO
